package com.example.airmanagement.airs;

import com.example.airmanagement.R;

public class Air_temperature {
    protected String airName;
    protected String tempName;
    protected double tempNum;
//    protected String imgAir;//空调图片
//    protected String imgTemp;//温度图片

    public String getAirName() {
        return airName;
    }

    public void setAirName(String airName) {
        this.airName = airName;
    }

    public String getTempName() {
        return tempName;
    }

    public void setTempName(String tempName) {
        this.tempName = tempName;
    }

    public double getTempNum() {
        return tempNum;
    }

    public void setTempNum(double tempNum) {
        this.tempNum = tempNum;
    }
//    带参构造创建方法
    public Air_temperature(String airName,String tempName,float tempNum){
        this.airName = airName;
        this.tempName = tempName;
        this.tempNum = tempNum;
    }

    //根据空调名称获取
public int getImgAir(){
      switch (this.airName) {
          case "格力":
              return R.mipmap.geli;
          case "美的":
              return R.mipmap.meddi;
          case "海尔":
            return R.mipmap.haier;
         default:
             return R.mipmap.xiaozi; // 返回默认图片
     }
}
//根据温度名称获取温度图片
    public int getImgTemp() {
        switch (this.tempName) {
            case "制冷":
                return R.mipmap.snow;
            case "温暖":
                return R.mipmap.warm;
            case "干燥":
                return R.mipmap.dehum;
            default:
                return R.mipmap.wait; // 返回待机
        }
    }

}
